﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Impediments.ascx.cs" Inherits="AgileDashboard.controls.Impediments" %>
<%@ OutputCache Duration="1" VaryByParam="None" %>
<%@ Import Namespace="AgileDashboard.AppCode" %>
<%@ Import Namespace="System.Globalization" %>
<asp:Repeater ID="Repeater1" runat="server">
    <HeaderTemplate>
    </HeaderTemplate>
    <ItemTemplate>
    <div class="impediment">
        <div class="impedimentTab <%# ((Story)Container.DataItem).Theme != null ? ((Story)Container.DataItem).Theme.ToLower() : "" %>Color"><%# ((Story)Container.DataItem).Theme != null ? ((Story)Container.DataItem).Theme.ToLower() : "" %></div>
        <div class="impedimentBox <%# ((Story)Container.DataItem).Theme != null ? ((Story)Container.DataItem).Theme.ToLower() : "" %>Color">
            <%# ((Story)Container.DataItem).Name ?? "none"%>
            <p class="impedimentAttributes">
            <% if (this.ShowImpedimentAge){%>
            Age: <%# (DateTime.Now - ((Story)Container.DataItem).CreateDate).Days.ToString(CultureInfo.InvariantCulture)%> days<br />
            <%}%>
            Team: <%# ((Story)Container.DataItem).Team ?? "not assigned"%><br />
            Status: <%# ((Story)Container.DataItem).Status ?? "new"%><br />
            Category: <%# ((Story)Container.DataItem).ImpedimentCategory %><br />
            ID: <%# ((Story)Container.DataItem).Id%><br />
            </p>
            <% if (this.ShowDescription){%>
            <div class="more">[Show Description]</div><div class="less hide">[Hide Description]</div>
            <div class="impedimentDescription hide"><%# ((Story)Container.DataItem).Description ?? "none"%></div>
            <%}%>
        </div>
    </div>
    <%# ((Container.ItemIndex + 1) % 3 == 0) ? @"<div class='clear'></div>" : string.Empty %>
    </ItemTemplate>
    <SeparatorTemplate>
    </SeparatorTemplate>
    <FooterTemplate>
    </FooterTemplate>
</asp:Repeater>